
ITEM.base = "base_building"
ITEM.class = "barrel"
ITEM.label = "Barrel"
ITEM.description = "A barrel. Great for storing things."
ITEM.weight = 15
ITEM.model = "models/props_c17/woodbarrel001.mdl"
ITEM.icon = "wintersurvival/icon_fence"
ITEM.lootable = true

//Building

function ITEM:onBuildingInitialize(pl,tab)
	if CLIENT then
		return
	end
	local GM = gmod.GetGamemode()
	
	tab.nextuse = 0
	tab.inventory = {}
end

function ITEM:onBuildingUse(pl,tab)
	if CLIENT then
		return
	end
	if CurTime() < tab.nextuse then
		return
	end
	
	local GM = gmod.GetGamemode()
	GM:BuildingUpdate(tab,pl)
	
	tab.nextuse = CurTime() + 1
end
